﻿<%@ Page Language="C#" CodeBehind="PackageChange.aspx.cs" Inherits="famails.BackEnd.page.PackageChange" MasterPageFile="~/BackEnd/template/BackEnd_NoneVMenu.Master" %>



<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <%--<asp:ListItem Value="30">1 tháng</asp:ListItem>
                                            <asp:ListItem Value="90">3 tháng</asp:ListItem>
                                            <asp:ListItem Value="180">6 tháng</asp:ListItem>
                                            <asp:ListItem Value="365">1 năm</asp:ListItem>--%><%#Eval("functionName") %><%#Eval("functionName") %>
    <%--<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always" >
        <ContentTemplate>--%>
            <div style="width: 100%; padding: 10px;">
                <asp:Panel Visible="false" ID="pnError" runat="server">
                    <div class="error-box round">
                        <asp:Label ID="lblError" runat="server" Text=""></asp:Label>
                    </div>
                </asp:Panel>
                <asp:Panel Visible="false" ID="pnSuccess" runat="server">
                    <div class="confirmation-box round">
                        <asp:Label ID="lblSuccess" runat="server" Text=""></asp:Label>
                    </div>
                </asp:Panel>
                <!--start content 01-->
                <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 0px; border: 1px solid #333;">
                    <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 10px 20px; background: #000; color: #fff; font-size: 18px; font-weight: bold; position: relative;">
                        Thông tin tài khoản -
                        <asp:Label ID="lblTitle" runat="server" Font-Size="1em" ForeColor="White"></asp:Label></h3>
                    </div>
                    <div id="extendbox" runat="server" class="col-md-12 col-xs-12 col-sm-12 col-lg-12">
                        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px;">
                            <fieldset>
                                <div class="col-md-2 col-xs-12 col-sm-12 col-lg-2" style="text-transform: none; margin-top: 10px">
                                    <b style="color:#999;">Thời gian gia hạn</b>
                                </div>
                                <div class="col-md-4 col-xs-12 col-sm-12 col-lg-4" style="text-transform: none; color: #52964F">
                                    <asp:DropDownList ID="ddlExtend" CssClass="form-control" Style="border-radius: 0px; border: 1px solid #333;" runat="server" AppendDataBoundItems="True" AutoPostBack="True" OnSelectedIndexChanged="ddlExtend_SelectedIndexChanged">
                                        <asp:ListItem Value="0">Chọn thời hạn</asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                                <div class="col-md-2 col-xs-12 col-sm-12 col-lg-2" style="text-transform: none; margin-top: 10px">
                                    <b style="color:#999;">Ngày hết hạn</b>
                                </div>
                                <div class="col-md-4 col-xs-12 col-sm-12 col-lg-4" style="font-weight: bold; padding-top: 10px; text-transform: none">
                                    <asp:Label ID="lblExpireDate" runat="server" Text=""></asp:Label>
                                </div>
                            </fieldset>
                        </div>
                        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px;">
                            <fieldset>
                                <div class="col-md-2 col-xs-4 col-sm-4 col-lg-2" style="text-transform: none; margin-top: 10px">
                                    <b style="color:#999;">Chi phí</b>
                                </div>
                                <div class="col-md-6 col-xs-4 col-sm-4 col-lg-6" style="font-weight: bold; text-transform: none; margin-top: 10px">
                                    <asp:Label ID="lblExtendCost" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-4 col-xs-4 col-sm-4 col-lg-4" style="text-transform: none">
                                    <button runat="server" class="btn" style="background: #333; border-radius: 0px; color: #fff;" onserverclick="btnGiahan_Click" >
                                        <i class="fa fa-wrench"></i>Gia hạn
                                    </button>
                                </div>
                            </fieldset>
                        </div>
                    </div>

                    <div id="upgradeservices" runat="server" class="col-md-12 col-xs-12 col-sm-12 col-lg-12" visible="false">
                        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 0px;">

                            <fieldset>
                                <div class="col-md-3 col-xs-12 col-sm-12 col-lg-3" style="padding: 10px; height: 73px;">
                                    <div style="padding: 10px 0px; text-transform: none">
                                        <b style="color:#999;">Gói dịch vụ hiện tại</b>
                                    </div>
                                    <asp:Label ID="lblTenGoi" Style="font-weight: bold;color:#d00" runat="server" Text=""></asp:Label>
                                </div>
                                <div class="col-md-3 col-xs-12 col-sm-12 col-lg-3" style="padding: 10px">
                                    <div style="padding: 10px 0px; text-transform: none">
                                        <b style="color:#999;">Gói dịch vụ có thể nâng cấp</b>
                                    </div>
                                    <asp:DropDownList ID="ddlUpgradeServices" CssClass="form-control" Style="border-radius: 0px; border: 1px solid #333;" runat="server" AppendDataBoundItems="True" AutoPostBack="True" OnSelectedIndexChanged="ddlUpgradeServices_SelectedIndexChanged">
                                        <%--<asp:ListItem Value="0">Chọn gói nâng cấp</asp:ListItem>--%>
                                    </asp:DropDownList>
                                </div>

                                <div class="col-md-3 col-xs-12 col-sm-12 col-lg-3" style="padding: 10px">
                                    <div style="padding: 10px 0px; text-transform: none">
                                        <b style="color:#999;">Thời gian</b>
                                    </div>
                                    <asp:DropDownList ID="ddlUpgradeTime" runat="server" CssClass="form-control" Style="border-radius: 0px; border: 1px solid #333;" AppendDataBoundItems="True" AutoPostBack="True" OnSelectedIndexChanged="ddlUpgradeTime_SelectedIndexChanged">
                                        <asp:ListItem Value="0-0-0">Chọn thời hạn</asp:ListItem>
                                        <%--<asp:ListItem Value="30">1 tháng</asp:ListItem>
                                            <asp:ListItem Value="90">3 tháng</asp:ListItem>
                                            <asp:ListItem Value="180">6 tháng</asp:ListItem>
                                            <asp:ListItem Value="365">1 năm</asp:ListItem>--%>
                                    </asp:DropDownList>
                                </div>
                                <div class="col-md-3 col-xs-12 col-sm-12 col-lg-3" style="padding: 10px">
                                    <div style="padding: 10px 0px; text-transform: none">
                                        <b style="color:#999;">Gói giới hạn</b>
                                    </div>
                                    <asp:DropDownList ID="ddlPackageLimitUpgrade" runat="server" CssClass="form-control" Style="border-radius: 0px; border: 1px solid #333;" AutoPostBack="True" OnSelectedIndexChanged="ddlPackageLimitUpgrade_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </div>
                                <div class="col-md-2 col-xs-12 col-sm-12 col-lg-2" style="padding: 10px">
                                    <div style="padding: 10px 0px; text-transform: none">
                                         <b style="color:#999;">Đơn giá gói</b>
                                    </div>
                                    <asp:Label ID="lblFee" Style="font-weight: bold;" runat="server" Text=""></asp:Label>
                                </div>

                                <div class="col-md-3 col-xs-12 col-sm-12 col-lg-3" style="padding: 10px">
                                    <div style="padding: 10px 0px; text-transform: none">
                                         <b style="color:#999;">Tiền thừa gói cũ(Đơn giá/Số ngày còn lại)</b>
                                    </div>
                                    <asp:Label ID="lblFeeRemain" Style="font-weight: bold;" runat="server" Text=""></asp:Label>
                                </div>
                                <div class="col-md-3 col-xs-12 col-sm-12 col-lg-3" style="padding: 10px">
                                    <div style="padding: 10px 0px; text-transform: none">
                                         <b style="color:#999;">Thời gian còn lại của gói cũ</b>
                                    </div>
                                    <asp:Label ID="lblTimeLeft" Style="font-weight: bold;" runat="server" Text=""></asp:Label>
                                </div>

                                <div class="col-md-2 col-xs-12 col-sm-12 col-lg-2" style="padding: 10px">
                                    <div style="padding: 10px 0px; text-transform: none">
                                         <b style="color:#999;">Thời gian hết hạn</b>
                                    </div>
                                    <asp:Label ID="lblUpgradeExpireTime" Style="font-weight: bold;" runat="server" Text=""></asp:Label>
                                </div>
                                <div class="col-md-2 col-xs-12 col-sm-12 col-lg-2" style="padding: 10px;padding-top:30px;">
                                    <button runat="server" class="btn pull-right" style="background: #333; border-radius: 0px; color: #fff;" onserverclick="btnUpgrade_Click">
                                        <%----%>
                                        <i class="fa fa-upload"></i>Nâng cấp
                                    </button>
                                </div>
                                <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 10px">
                                    <div style="padding: 10px 0px; text-transform: none">
                                        <b style="color:#999;">Chức năng</b>
                                    </div>
                                    <div id="optionchkbox" runat="server">
                                        <asp:Repeater ID="rptListOptionsUpgrade" runat="server">
                                            <ItemTemplate>
                                                <div class="col-md-3 col-lg-3 col-xs-12 col-sm-6" style="padding: 10px;">
                                                    <div class="col-md-12 col-lg-12 col-xs-12 col-sm-12" style="border: 1px solid #333; color: #333; font-weight: bold; padding: 5px 15px; text-align: justify;">
                                                        <asp:CheckBox style="float:left;margin-right:10px;" ID="chkOptionsUpgrade" runat="server" AutoPostBack="true" OnCheckedChanged="chkOptionsUpgrade_CheckedChanged" Text='<%#Eval("functionName") %>' Enabled='<%# (Convert.ToBoolean(Eval("ISDEFAULT"))?false:true) %>' Checked='<%# (Convert.ToBoolean(Eval("selected"))?true:false) %>' />

                                                        <asp:Label ID="lblIDUpgrade" runat="server" Style="display: none;float:left;margin-right:10px;" Text='<%#Eval("functionId") %>' Visible="false"></asp:Label>
                                                        <asp:Label ID="lblCostUpgrade" runat="server" Style="float:left;margin-right:10px;" Text='<%#Eval("cost") %>' Visible="false"></asp:Label>
                                                        <asp:Label ID="lblCheckUpgrade" runat="server" Style="display: none;float:left;margin-right:10px;" Text='<%#Eval("selected") %>' Visible="false"></asp:Label>
                                                    </div>
                                                </div>
                                                <%--                                                    <div class="confirmation-box" style="float: left; border: none !important">
                                                    </div>--%>
                                            </ItemTemplate>
                                        </asp:Repeater>
                                    </div>
                                </div>
                            </fieldset>

                        </div>
                    </div>


                    <div id="changeoptionbox" runat="server" class="col-md-12 col-xs-12 col-sm-12 col-lg-12" visible="false">
                        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 0px;">
                            <fieldset>
                                <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 10px;">
                                    <div style="padding: 10px 0px; margin-bottom: 12px; text-transform: none">
                                        Chức năng
                                    </div>
                                    <asp:Repeater ID="rptListOptions" runat="server" OnItemDataBound="rptListOptions_ItemDataBound">
                                        <ItemTemplate>
                                            <div style="width: 20%; float: left; padding: 5px;">
                                                <div style="height: 50px; border: 1px solid #333; color: #333; font-weight: bold; padding: 5px 10px; text-align: justify;">
                                                    <asp:CheckBox ID="chkOptions" runat="server" AutoPostBack="true" OnCheckedChanged="chkOptions_CheckedChanged" /><%#Eval("functionName") %><asp:Label ID="lblID" runat="server" Text='<%#Eval("functionId") %>' Visible="false" Style="display: none;"></asp:Label><asp:Label ID="lblCost" runat="server" Text='<%#Eval("cost") %>' Visible="False" Style="display: none;"></asp:Label><asp:Label ID="lblCheck" runat="server" Text='<%#Eval("isDefault") %>' Visible="false" Style="display: none;"></asp:Label>
                                                </div>
                                            </div>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </div>
                                <div class="col-md-4 col-xs-12 col-sm-12 col-lg-4" style="padding: 10px">
                                    <div style="padding: 10px 0px; text-transform: none">
                                        Gói giới hạn
                                    </div>
                                    <asp:DropDownList ID="ddlLimitPackage" runat="server" CssClass="form-control" Style="border-radius: 0px; border: 1px solid #333;" AutoPostBack="True" OnSelectedIndexChanged="ddlLimitPackage_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </div>

                                <div class="col-md-4 col-xs-12 col-sm-12 col-lg-4" style="padding: 10px">
                                    <div style="padding: 10px 0px; margin-bottom: 11px; text-transform: none">
                                        Chi phí
                                    </div>
                                    <asp:Label ID="lblSumCost" runat="server" Text=""></asp:Label>
                                </div>


                                <div class="col-md-4 col-xs-12 col-sm-12 col-lg-4" style="padding: 10px">
                                    <asp:LinkButton ID="btnEditOption" runat="server">
                                            <button runat="server" class="btn pull-right" style="background:#333;border-radius:0px;color:#fff;" onserverclick="btnEditOption_Click" OnClick="return confirm('Bạn có chắc chán muốn thay đổi ?');">
                                                <i class="fa fa-cog"></i> Thay đổi
                                            </button>
                                    </asp:LinkButton>
                                </div>
                            </fieldset>

                        </div>
                    </div>


                </div>
            </div>

        <%--</ContentTemplate>
    </asp:UpdatePanel>--%>
</asp:Content>

